<?php
	include('../../../public/bootrap.php');
	$file 		= $_FILES['uploadimage'];
	
	$fileName	= uploadfile("../../../media/website/banner/",$file,1);
	
	$data	= array('img'=>'/media/website/banner/'.$fileName);
					
	$imageid = $db->insert('tablbanner', $data);				
	
	$data	= array( "file"=>$fileName
				,"title"=>$file['name']
				,'imgid'=>$imageid
				,'img'=>true
			);
	print json_encode($data);
	exit();